package com.tornado.community.dto;

import com.tornado.community.advice.NotificationTypeEnum;
import com.tornado.community.model.Notification;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.beans.BeanUtils;

@EqualsAndHashCode(callSuper = true)
@Data
public class NotificationDto extends Notification {
    public NotificationDto(Notification notification) {
        BeanUtils.copyProperties(notification, this);
        this.hint = NotificationTypeEnum.hintOf(notification.getType());
    }

    private String hint;
}
